package com.offcn.service;

import com.offcn.dao.MovieDao;
import com.offcn.entity.Movie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.HashMap;

@Service
public class MovieService {
    @Autowired
    private MovieDao movieDao;
    @Value("${server.port}")
    private String myport;
    @GetMapping("/movie")
    public Movie getMovie(){
        System.out.println("端口号:"+myport);
        System.out.println("I am lucy");
        return movieDao.getMovie();
    }
}
